/**
 * 获取 URL 的基础名称
 * @param url 要获取基础名称的 URL
 * @returns URL 的基础名称
 */
export function getBaseName(url: string): string {
    let baseName: string;
    baseName = url.replaceAll("\\", "/");
    baseName = baseName.substring(baseName.lastIndexOf("/") + 1);
    let lastDot = baseName.lastIndexOf(".");
    if (lastDot != -1) {
        baseName = baseName.substring(0, baseName.lastIndexOf("."));
    }
    return baseName;
}
